package com.maiji.cloud.entities.shopingmall;

import java.util.Date;

import com.baomidou.mybatisplus.annotations.TableId;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;

import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * 
 * Description:  优惠券兑换记录表
 * @author zhanglr  
 * @date 2019年6月20日
 */
@NoArgsConstructor
@Data
@Accessors(chain = true)
@Table(name = "exchange_log")
public class ExchangeLog {

	@TableId
	@Column(name = "uu_id", type = MySqlTypeConstant.VARCHAR, length = 50, isKey = true)
	private String uuId;
	
	@Column(name = "user_id", type = MySqlTypeConstant.VARCHAR, length = 50)
	private String userId; // 用户id
	
	@Column(name = "discount_coupon", type = MySqlTypeConstant.VARCHAR, length = 50)
	private String discountCoupon; //优惠券id/商品id
	
	@Column(name = "order_id", type = MySqlTypeConstant.VARCHAR, length = 50)
	private String orderId; //兑换商品之后生成的订单id

	@Column(name = "num", type = MySqlTypeConstant.INT, length = 2)
	private Integer num; //兑换商品数量
	
	@Column(name = "face_value", type = MySqlTypeConstant.INT, length = 2)
	private Integer faceValue; //面值
	
	@Column(name = "good_name", type = MySqlTypeConstant.VARCHAR, length = 50)
	private String goodName; //商品名字
	
	@Column(name = "is_use", type = MySqlTypeConstant.INT, length = 2, defaultValue = "0")
	private Integer isUse; //是否使用 0:未使用，1已使用
	
	@Column(name = "type", type = MySqlTypeConstant.INT, length = 2)
	private Integer type; //1：优惠券，2商品
	
	@Column(name = "discount_coupon_type", type = MySqlTypeConstant.INT, length = 50)
	private Integer discountCouponType; //兑换优惠券类型1:积分兑换，2：免费领取
	
	@Column(name = "integral", type = MySqlTypeConstant.INT, length = 50)
	private Integer integral; //积分
	
	@Column(name = "end_time", type = MySqlTypeConstant.DATETIME)
	private Date endTime;  //兑换的优惠券截止时间
	
	@Column(name = "in_time", type = MySqlTypeConstant.DATETIME)
    private Date inTime;  // 兑换时间

}
